package com.lianzai.ticket.dao;

import com.lianzai.shop.model.TicketOrderDO;
import com.lianzai.ticket.model.MerchantTicketDO;
import com.lianzai.ticket.model.Ticket;
import com.lianzai.ticket.model.TicketDiscount;
import com.lianzai.ticket.model.TicketUseInfoDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 停车券
 */
@Mapper
public interface TicketDao {
	List<Ticket> list(Map<String, Object> map);
	int count(Map<String, Object> map);
	int remove(Long id);
	List<Map<String, Object>> queryTicektShopUsedList(Map<String, Object> map);
	List<Map<String, Object>> listRel(Map<String, Object> map);
	int save(Ticket ticket);
	int update(Ticket ticket);
	Ticket get(Long id);
	int bind(Map<String, Object> map);
	int delBind(Map<String, Object> map);
	int delAllBind(Map<String, Object> map);
	List<Ticket> check(String name);
	Ticket getTicketSpecByWXId(String openId);
	List<TicketDiscount> getTicketDiscountByWXId(String openId);
	int buyTicket(MerchantTicketDO merchantTicketDO);
	int increaseTicket(MerchantTicketDO merchantTicketDO);
	MerchantTicketDO getTicketOverview(Integer userId);
	List<Map<String, Object>> getTicketOrderList(Map<String, Object> map);
	int countTicketOrder(Integer userId);
	List<TicketUseInfoDO> getTicketUseList(Map<String, Object> map);
	int countTicketUse(Map<String, Object> map);
	Ticket getTicketSpecByUserAndCommunity(Map<String, Object> map);
}
